package com.tansun.easycare.rule.ml.algorithm.entity;

import java.lang.reflect.Field;
import java.util.Map;

/**
 * 算法工作流程类
 * @author xch
 * @version 2018-08-24
 */
public class MlWorkflows {
	
	private String dataInput="Gray"; 			//数据导入
	private String dataSetup="Gray";			//数据设置
	private String parameterSetup="Gray";		//参数设置
	private String dataProcess="Gray";			//数据处理
	private String visualPreview="Gray";		//可视化预览
	private String trainModel="Gray";			//模型训练
	
	private String scatterDiagram="Gray";		//散点图
	private String correlogram="Gray";			//相关图
	private String boxLine="Gray";				//箱线图
	private String histogram="Gray";			//直方图
	private String barGraph="Gray";				//柱状图
	private String mosaic="Gray";				//马赛克图
	
	private String decisionTree="Gray";			//决策树
	private String randomForest="Gray";			//随机森林
	private String logisticRegression="Gray";	//逻辑回归
	private String typeConver="Gray";			//类型转换
	
	private String featureAnalysis= "Gray";
	private String confusionMatrix="Gray";			//混淆矩阵
	private String rocCurve="Gray";				//ROC曲线
	private String liftCurve="Gray";			//life曲线
	private String comparisonTest="Gray";		//回归分析的对比测试
	private String bestK="Gray";		//最佳K值
	
	private String className="Gray";//分类命名
	private String dataApply="Gray";			//数据应用
	private String scplot = "Gray";//关联规则,支持度与置信度
	private String associationRules="Gray";		//关联规则
	private String dataTransfer="Gray";		//关联规则
	private String dataSetProcess="Gray";		//数据集处理
	
	public MlWorkflows() {
	}
	/**
	 * 使用反射将map解析
	 * @param map
	 * @return
	 */
	public static MlWorkflows newInstance(Map<?,?> map){
		MlWorkflows workflows = new MlWorkflows();
		Field[] fields = workflows.getClass().getDeclaredFields();   
		try {
			for (Field field : fields) {
				field.set(workflows, map.get(field.getName()));
			}
		} catch (IllegalArgumentException | IllegalAccessException e) {
			e.printStackTrace();
			throw new RuntimeException("map 解析成 workflows出错！");
		}   
		return workflows;
	}

	public String getDataTransfer() {
		return dataTransfer;
	}
	
	public void setDataTransfer(String dataTransfer) {
		this.dataTransfer = dataTransfer;
	}
	
	public String getComparisonTest() {
		return comparisonTest;
	}
	
	public void setComparisonTest(String comparisonTest) {
		this.comparisonTest = comparisonTest;
	}
	
	public String getDataInput() {
		return dataInput;
	}

	public void setDataInput(String dataInput) {
		this.dataInput = dataInput;
	}

	public String getParameterSetup() {
		return parameterSetup;
	}

	public String getBestK() {
		return bestK;
	}
	public void setBestK(String bestK) {
		this.bestK = bestK;
	}
	
	public void setParameterSetup(String parameterSetup) {
		this.parameterSetup = parameterSetup;
	}
	
	public String getDataSetup() {
		return dataSetup;
	}

	public void setDataSetup(String dataSetup) {
		this.dataSetup = dataSetup;
	}

	public String getDataProcess() {
		return dataProcess;
	}

	public void setDataProcess(String dataProcess) {
		this.dataProcess = dataProcess;
	}

	public String getVisualPreview() {
		return visualPreview;
	}

	public void setVisualPreview(String visualPreview) {
		this.visualPreview = visualPreview;
	}

	public String getScatterDiagram() {
		return scatterDiagram;
	}

	public void setScatterDiagram(String scatterDiagram) {
		this.scatterDiagram = scatterDiagram;
	}

	public String getCorrelogram() {
		return correlogram;
	}

	public void setCorrelogram(String correlogram) {
		this.correlogram = correlogram;
	}

	public String getBoxLine() {
		return boxLine;
	}

	public void setBoxLine(String boxLine) {
		this.boxLine = boxLine;
	}

	public String getHistogram() {
		return histogram;
	}

	public void setHistogram(String histogram) {
		this.histogram = histogram;
	}

	public String getBarGraph() {
		return barGraph;
	}

	public void setBarGraph(String barGraph) {
		this.barGraph = barGraph;
	}

	public String getMosaic() {
		return mosaic;
	}

	public void setMosaic(String mosaic) {
		this.mosaic = mosaic;
	}

	public String getDecisionTree() {
		return decisionTree;
	}

	public void setDecisionTree(String decisionTree) {
		this.decisionTree = decisionTree;
	}

	public String getRandomForest() {
		return randomForest;
	}

	public void setRandomForest(String randomForest) {
		this.randomForest = randomForest;
	}

	public String getLogisticRegression() {
		return logisticRegression;
	}

	public void setLogisticRegression(String logisticRegression) {
		this.logisticRegression = logisticRegression;
	}

	public String getTypeConver() {
		return typeConver;
	}

	public void setTypeConver(String typeConver) {
		this.typeConver = typeConver;
	}

	public String getConfusionMatrix() {
		return confusionMatrix;
	}

	public void setConfusionMatrix(String usionMatrix) {
		this.confusionMatrix = usionMatrix;
	}

	public String getRocCurve() {
		return rocCurve;
	}

	public void setRocCurve(String rocCurve) {
		this.rocCurve = rocCurve;
	}

	public String getLiftCurve() {
		return liftCurve;
	}

	public void setLiftCurve(String liftCurve) {
		this.liftCurve = liftCurve;
	}

	public String getDataApply() {
		return dataApply;
	}

	public void setDataApply(String dataApply) {
		this.dataApply = dataApply;
	}

	public String getAssociationRules() {
		return associationRules;
	}

	public void setAssociationRules(String associationRules) {
		this.associationRules = associationRules;
	}
	
	public String getTrainModel() {
		return trainModel;
	}
	
	public void setTrainModel(String trainModel) {
		this.trainModel = trainModel;
	}
	
	public String getScplot() {
		return scplot;
	}
	
	public void setScplot(String scplot) {
		this.scplot = scplot;
	}
	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	public String getFeatureAnalysis() {
		return featureAnalysis;
	}
	public void setFeatureAnalysis(String featureAnalysis) {
		this.featureAnalysis = featureAnalysis;
	}
	public String getDataSetProcess() {
		return dataSetProcess;
	}
	public void setDataSetProcess(String dataSetProcess) {
		this.dataSetProcess = dataSetProcess;
	}
	
}
